<template>
	<view class="info">
		<view class="info_top">
			<image class="info_img" src="@/static/info.png"></image>
			<view class="info_btn">
				<view class="info_btn_gh">更换</view>
			</view>
		</view>
		<view style="padding: 0rpx 20rpx;">
			<view class="form-bag">
				<view class="store">
					<view class="store_size">店铺开启</view>
					<u-switch v-model="checked" size="30" active-color="#00c080"></u-switch>
				</view>
				<view class="popup_form">
					<u-form :model="form" :label-style="{ fontSize: '30rpx',  }" ref="uForm" label-width="180rpx">
						<u-form-item label="店铺名称："><u-input :clearable="false" placeholder="请输入" /></u-form-item>
						<u-form-item label="联系方式："><u-input :clearable="false" placeholder="请输入" /></u-form-item>
						<u-form-item label="店铺位置："><u-input :clearable="false" placeholder="请输入" /></u-form-item>
						<u-form-item label="详细位置："><u-input :clearable="false" placeholder="请输入" /></u-form-item>
						<u-form-item label="配送方式：">
							<u-radio-group v-model="value" @change="radioGroupChange">
								<u-radio @change="radioChange" v-for="(item, index) in list" :key="index"
									:name="item.name" :disabled="item.disabled" active-color="red" shape="circle">
									{{item.name}}
								</u-radio>
							</u-radio-group>
						</u-form-item>
					</u-form>
				</view>
			</view>
			<view class="form-bag">
				<view class="title">
					营业执照
				</view>
				<view class="licence">
					<image class="img" src="@/static/img/licence.png" mode="heightFix"></image>
					<view class="change">
						更换
					</view>
				</view>
			</view>
			
			<view class="form-bag">
				<view class="title">
					配送范围
				</view>
				<view class="map-box">
					<map class="map" name=""></map>
					<view class="edit" @click="toPath">
						<image class="img" src="@/static/img/pen.png" mode="widthFix"></image>
					</view>
				</view>
			</view>
			
			<view class="form-bag">
				<view class="title">
					店铺介绍
				</view>
				<view class="textarea">
					<u-input type="textarea" height="400" placeholder="请输入店铺介绍" />
				</view>
			</view>
		</view>
		
		<view class="dc_top">
			<view class="dc_btn" @click="toPath">完成</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				checked: false,
				value: '送货上门',
				list: [{
						name: '送货上门',
						disabled: false
					},
					{
						name: '自提',
						disabled: false
					}
				],
			}
		},
		methods: {
			toPath() {
				uni.navigateTo({
					url: '/pages/store_settings/range'
				})
			},
			radioChange(e) {
				// console.log(e);
			},
			radioGroupChange(e) {
				// console.log(e);
			}
		}
	}
</script>

<style>
	page {
		background-color: #F4F5F7;
		padding-bottom: 240rpx;
	}
</style>
<style scoped lang="scss">
	.dc_top {
		position: fixed;
		bottom: 80rpx;
		width: 100%;
		padding: 0rpx 37rpx;
		left: 0;
		.dc_btn {
			height: 88rpx;
			border-radius: 44rpx;
			background: linear-gradient(147.27deg, #F1714E 0%, #E93E30 100%);
			font-size: 32rpx;
			font-weight: 500;
			line-height: 44rpx;
			color: #FFF;
			display: flex;
			align-items: center;
			justify-content: center;
		}
	}
	.textarea {
		height: 400rpx;
	}
	.map-box {
		position: relative;
		.edit {
			position: absolute;
			top: 37rpx;
			right: 19rpx;
			background-color: #F4F5F7;
			border-radius: 10rpx;
			width: 60rpx;
			height: 60rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			.img {
				width: 42rpx;
			}
		}
		.map {
			width: 100%;
			height: 400rpx;
		}
	}
	.licence {
		height: 400rpx;
		display: flex;
		align-items: center;
		justify-content: center;
		position: relative;
		.change	{
			width: 100rpx;
			height: 48rpx;
			position: absolute;
			top: 37rpx;
			right: 19rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 24rpx;
			font-weight: 400;
			color: #333333;
			background-color: #F4F5F7;
			border-radius: 10rpx;
		}
		.img {
			height: 100%;
		}
	}
	.form-bag {
		padding: 0rpx 34rpx; 
		background-color: #FFF;
		border-radius: 10rpx;
		margin-top: 20rpx;
		.title {
			height: 81rpx;
			font-size: 30rpx;
			font-weight: 400;
			color: #191919;
			line-height: 81rpx;
			border-bottom: 1rpx solid #e4e7ed;
		}
	}
	
	.info_top {
		position: relative;

		.info_img {
			width: 100%;
			height: 400rpx;
		}

		.info_btn {
			position: absolute;
			top: 20rpx;
			right: 21rpx;

			.info_btn_gh {
				width: 100rpx;
				height: 48rpx;
				border-radius: 10rpx;
				background: #F4F5F7;
				border: 1rpx solid #E5E5E5;
				font-size: 24rpx;
				font-weight: 400;
				line-height: 33rpx;
				color: #333333;
				display: flex;
				align-items: center;
				justify-content: center;
			}
		}
	}

	.store {
		display: flex;
		align-items: center;
		justify-content: space-between;
		border-bottom: 1rpx solid #F4F5F7;
	}

	.store_size {
		font-size: 30rpx;
		font-weight: 400;
		line-height: 99rpx;
		color: #333333;
	}

	.popup_form {
		::v-deep .u-form-item {
			height: 100rpx;
			display: flex;
			justify-content: center;
		}
	}
</style>